package game.player;

import game.GameManager;
import techLayer.NetworkController;

public class HumanNetwork extends Player {

	private GameManager gameManager;
	private NetworkController network;

	public HumanNetwork(String name, int player, int colorID, NetworkController network, GameManager gameManager) {
		super(name, player, colorID);
		this.network = network;
		this.gameManager = gameManager;
	}

	@Override
	public int nextMove() {
		int column = gameManager.getMarkerQueue().getNextMoveFromQueue();
		network.sendMove(column);
		return column;
	}
	
	@Override
	public void cleanUpPlayer() {
		network.closeConnection();
	}	
}